package com.wr.utils;

import com.alibaba.druid.pool.DruidDataSource;
import com.wr.annotation.Component;

import javax.sql.DataSource;

/**
 * @author 王瑞
 * @descreption:
 * @date 2020/2/14  22:59
 */
@Component
public class DataSourceUtil {


    public DataSource getDataSource() {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mysql://localhost:3306/bank?serverTimezone= GMT%2B8");
        dataSource.setPassword("Zhengai666.");
        dataSource.setUsername("root");
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        return dataSource;
    }


}
